Allow updating transitive deps
authorAlex Crichton <alex@alexcrichton.com>
Sat, 16 Aug 2014 01:25:12 +0000 (18:25 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 19 Aug 2014 06:43:27 +0000 (23:43 -0700)
commitae1962d7598a4e38ec81f9e3dfb949c159fb0214
tree67e9c0f14cdbcfc38d2e41c67045e14140ae8684
parenta216b9f7cd7a259a19d1672a621db993e9a5c88e
Allow updating transitive deps

Previously `cargo update foo` would only update the package `foo` if it were a
direct dependency of the local package. This meant that to update a transitive
dependency you would have to update the top-level dependency.

This commit adds the ability to update any dependency by name, regardless of
where it is in the dependency graph. This commit is a bit lossy in terms of
behavior. We are guaranteed that the set of immediate dependencies for any one
package have unique names, but not for the entire package graph. This means that
when you invoke `cargo update foo` it could possibly update two packages named
`foo`.

I believe this behavior to be acceptable for now and we can add a more stringent
update syntax later (something like `cargo update --namespace foo bar`). I
believe we'll always want this CLI usage, however.
src/cargo/ops/cargo_generate_lockfile.rs
tests/test_cargo_compile_git_deps.rs